<?php 

/**
 * 客户端已经阅读了消息
 */
class HaveReadMessage extends APIBase {

	public $tag = "HaveReadMessage";

	public function before() {
		$this->initMysql();
		return true;
	}

	public function logic() {
		$sign = $this->mysql->update("message", array('status' => 1), array('uid' => $this->uid));		
		if (!$sign) {
			$this->returnError(301,"server db err.");
		}
		$data = array();
		$data['msg'] = 'succ';
		$this->returnData($data);	
	}

	public function after() {
		$this->deinitMysql();
		$this->deinitDataRedis();
	}
}

?>